package com.txunda.zhuohired.aty.user.my;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;

import com.lidroid.xutils.view.annotation.ViewInject;
import com.txunda.zhuohired.R;
import com.txunda.zhuohired.adapter.user.my.LocationSelectAdapter;
import com.txunda.zhuohired.base.BaseAty;

/**
 * 创建人： Txd_Cjh
 * 创建时间： 2018/3/9 9:55
 * 功能描述：地图详情
 * 联系方式：jiahuanchen@126.com
 */

public class LocationSelectAty extends BaseAty {
    /**
     * 标题
     */
    @ViewInject(R.id.tv_layout_white_center)
    private TextView tv_layout_white_center;
    /**
     * listView
     */
    @ViewInject(R.id.lv_location_select)
    private ListView lv_location_select;

    private LocationSelectAdapter locationSelectAdapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        showStatusBar(R.id.layout_white_head);
        tv_layout_white_center.setText("地图详情");
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.aty_location_select;
    }

    @Override
    protected void initialized() {

    }

    @Override
    protected void requestData() {
        initAdapter();
    }

    private void initAdapter() {
        locationSelectAdapter = new LocationSelectAdapter(this);
        lv_location_select.setAdapter(locationSelectAdapter);
        lv_location_select.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                Intent intent = new Intent();
                intent.putExtra("","");
                setResult(RESULT_OK,intent);
                finish();
            }
        });
    }

}
